package com.yanqu.road.entity.player;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;

/**
 * @Author wpj
 * @Date 2020/8/30
 */
@FieldTypeAnnotation(tableName = "t_u_charitable_position")
public class UserCharitablePosition extends DataObject {
    @FieldTypeAnnotation(select = true, update = true)
    long userId;
    @FieldTypeAnnotation(update = true, desc = "行善地点-类型")
    int type;
    @FieldTypeAnnotation(desc = "行善总次数(可消耗)")
    int charitableForUpgradeTimes;

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }

    }
    public void setType(int type) {
        if (this.type != type) {
            this.type = type;
            setOp(DataStatus.Update);
        }

    }
    public void setCharitableForUpgradeTimes(int charitableForUpgradeTimes) {
        if (this.charitableForUpgradeTimes != charitableForUpgradeTimes) {
            this.charitableForUpgradeTimes = charitableForUpgradeTimes;
            setOp(DataStatus.Update);
        }

    }

    public long getUserId() {
        return userId;
    }

    public int getType() {
        return type;
    }

    public int getCharitableForUpgradeTimes() {
        return charitableForUpgradeTimes;
    }
}
